<?php
namespace Home\Controller;
use Home\Controller\BaseController;
class IndexController extends BaseController {
    public function index(){
        if(IS_POST && IS_AJAX){
            
        }else{
       
        $this->display();
        }
    }
    
    public function exPlain(){
        $this->display();
    }
    public function questionType(){
        $this->display();
    }
    public function Comment(){
        $this->display();
    }
    public function queStion(){
        $question=array(
            'title'=>'您对发改局帮扶重点企业的表现满意吗？',
            'choices'=>array(
                '满意',
                '基本满意',
                '不满意',
            )
        );
        $this->assign('question',$question);
        $this->display();
    }
    public function apPraise(){
        $this->display();
    }
    public function packet(){
        $this->display();
    }
    /**
     * 请求题目
     */
    public function getQuestion(){
        if(!IS_POST && !IS_AJAX) exit();
        $id=I('post.id',0,'intval');
        $join=" t_survey_index_item as t2 ON t1.ID=t2.indexID";
        $survey=M("t_survey_index as t1")->join($join)->where(array('t1.ID'=>$id))->select();
        if(!$survey){
         $this->ajaxReturn(0,'false', '');  
        }
        $question['title']=$survey[0]['indexdesc'];
        $question['choices']=array_column($survey, 'itemdesc');
        $this->ajaxReturn(1,'true',$question);
       
    }
    /**
     * 短信接口
     */
    public function sendMsg(){
        
    }
    
    
}